package com.hmy.material.service.impl;

import com.hmy.material.domain.HmyMateriaFeedStore;
import com.hmy.material.mapper.StoreMapper;
import com.hmy.material.service.StoreService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author zxh
 * @version 1.0
 * @description: 物料存储业务service接口实现类
 * @date 2024/1/31 12:25
 */
@Service
public class StoreServiceImpl implements StoreService {

    @Resource
    private StoreMapper storeMapper;

    @Override
    public List<HmyMateriaFeedStore> selectStoreList(Integer materiaFeedStorePosition, Integer materiaFeedType, String materiaFeedPurchaseDateStart, String materiaFeedPurchaseDateEnd) {
        return storeMapper.selectStoreList(materiaFeedStorePosition, materiaFeedType, materiaFeedPurchaseDateStart, materiaFeedPurchaseDateEnd);
    }

    @Override
    public HmyMateriaFeedStore selectStoreById(Long materiaFeedStoreId) {
        return storeMapper.selectStoreById(materiaFeedStoreId);
    }

    @Override
    public HmyMateriaFeedStore findStoreByTypePosition(String materiaFeedType, String materiaFeedStorePosition) {
        return storeMapper.findStoreByTypePosition(materiaFeedType, materiaFeedStorePosition);
    }

    @Override
    public int updateStoreNumById(Long materiaFeedStoreId, Long materiaFeedStoreNum) {
        return storeMapper.updateStoreNumById(materiaFeedStoreId, materiaFeedStoreNum);
    }

    @Override
    public List<HmyMateriaFeedStore> findStoreFeedTypeByPosition(String materiaFeedStorePosition) {
        return storeMapper.findStoreFeedTypeByPosition(materiaFeedStorePosition);
    }

    @Override
    public int selectMateriaFeedStoreNum(String materiaFeedType) {
        return storeMapper.selectMateriaFeedStoreNum(materiaFeedType);
    }

    /*@Override
    public int updateStoreNumByConsume(Long materiaFeedConsumeNum, String materiaFeedStorePosition, String materiaFeedType) {
        return storeMapper.updateStoreNumByConsume(materiaFeedConsumeNum, materiaFeedStorePosition, materiaFeedType);
    }*/

    @Override
    public int addStore(HmyMateriaFeedStore store) {
        return storeMapper.addStore(store);
    }

    @Override
    public int updateStore(HmyMateriaFeedStore store) {
        return storeMapper.updateStore(store);
    }

    @Override
    public int delStoreById(Long materiaFeedStoreId) {
        return storeMapper.delStoreById(materiaFeedStoreId);
    }

    @Override
    public int delStoreByIds(Long[] materiaFeedStoreIdS) {
        return storeMapper.delStoreByIds(materiaFeedStoreIdS);
    }
}
